package com.code.time1124;

import java.util.Arrays;

public class SystemTest {

	public static void main(String[] args) {
		int[] src = {1,2,3};
		int[] dest = new int[6];
		System.arraycopy(src, 1, dest, 1, 1);
		System.out.println(Arrays.toString(dest));
		
		int[] copyOf = Arrays.copyOf(src,12);//12大于src的length，所以是扩容
		System.out.println("扩容后新数组：" + Arrays.toString(copyOf));
		System.out.println("源数组：" + Arrays.toString(src));
	}

}
